import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import 'rxjs/add/operator/toPromise';
import { BaseHttpService } from './baseHttp.service';

@Injectable()
export class RiskBaseService extends BaseHttpService {
    constructor(private http: Http) {
        super(http);
    }

    public getCompanyRiskClusters(): Promise<any[]> {
        return super.get<any[]>(this.serverUrl + '/riskratingserv/api/v1/clusters/company');
    }

    public getMeiRiskClusters(): Promise<any[]>{
        return super.get<any[]>(this.serverUrl + '/riskratingserv/api/v1/clusters/mei');
    }
}